<html>
<head>
<script>
function buttonClick() {
	alert('Setting Focus');
	window.somediv.focus();
}
</script>
</head>
<body>

	<div id="somediv"><input type="text" name="somefield" id="somefield" size="50" /></div>
	<div id="" style="height: 2000px;"></div>
	<input type="submit" onclick="buttonClick();" value="Click Me" />
</body>
</html>